from django.db import models
from django.contrib.postgres.fields import JSONField


class WordList(models.Model):
    word = models.CharField(max_length=1024)
    matchstring = models.CharField(max_length=1024)
    matchtype = models.CharField(max_length=1024)
    region = models.CharField(max_length=1024)
    provider = models.CharField(max_length=1024)
    total = models.IntegerField()
    createts = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'wordlist'
        managed = False


class WordEntry(models.Model):
    entry = JSONField()
    meta = JSONField()
    createts = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'oxford_dict'
        managed = False
